home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / nonport / cursoff.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.2 KB  |  58 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    cursoff
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_cursoff = "$Header: C:\CURSES\nonport\RCS\cursoff.c 2.1 1993/06/18 20:22:08 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   cursoff()    - Turns off the hardware cursor.
  15.  
  16.   PDCurses Description:
  17.      Turns off the hardware curses, it does nothing if it is already off.
  18.  
  19.   PDCurses Return Value:
  20.      Returns OK upon success, ERR upon failure.
  21.  
  22.   PDCurses Errors:
  23.      ERR will be returned (in the case of FLEXOS) if the hardware cursor
  24.      can not be disabled.
  25.  
  26.   Portability:
  27.      PDCurses    int cursoff( void );
  28.  
  29. **man-end**********************************************************************/
  30.  
  31. int    cursoff(void)
  32. {
  33. #ifdef PDCDEBUG
  34.     if (trace_on) PDC_debug("cursoff() - called\n");
  35. #endif
  36.  
  37. #ifndef UNIX
  38.     if    (_cursvar.visible_cursor)
  39.     {
  40.         _cursvar.visible_cursor = FALSE;
  41. #ifdef     OS2
  42.         PDC_set_cursor_mode(32, 33);    /* turn it off */
  43. #else
  44.         switch (_cursvar.adapter)
  45.         {
  46.         case _FLEXOS:
  47.             PDC_set_cursor_mode(_cursvar.visible_cursor, 0);
  48.             break;
  49.         default:
  50.             PDC_set_cursor_mode(32, 33);    /* turn it off */
  51.             break;
  52.         }
  53. #endif
  54.     }
  55. #endif
  56.     return( OK );
  57. }
  58.